<?php
if(!defined('INDEX')){
	exit('Access Denied');
}
$pagesize=$dd_tpl_data['pagesize'];
include_once(DDROOT.'/plugin/miaozhe/public.php');
$bankuai_code=$bankuai_code?$bankuai_code:$_GET['code'];
$parameter=act_goods_list($bankuai_code,$_GET['do'],$ajax_load_num,$pagesize,$_GET['page'],$_GET['cid'],$goods_total);
extract($parameter);
if(defined('VIEW_PAGE')||$_GET['page']<=1){
?>
<div class="brand_big_list">
<!--这里必须定义一个goods_items-->
<ul class="goods_items">
<?php }?>
<?php if(!empty($goods_list)){?>
<?php foreach($goods_list as $row){?>
<li>
	              <div class="list-good">  
				      <div class="big_list">
									    <a class="click_url" dd-href="?mod=jump&act=s8&iid=<?=iid_encode($row['data_id'])?>&url=" data-itemid="<?=$row['data_id']?>" isconvert=1 href="<?=$row['url']?>" target="_blank">
									   
	                                <span class="pic">
										<?=dd_html_img($row['img'],$row['title'],500)?>
<?php if($row['top']>0){?><span class="tuijian"></span><?php }?>
		<?php if($row['is_starttime']){?>
<span class="yugao2"></span>
<?php }else{?>
<?php if($row['is_new']){?><span class="new-icon"></span><?php }?>
<?php }?>							
									</span></a>
									<div class="right">
	                                <div class="title yahei">
										<?php if($row['laiyuan_type']==1){?><div title="淘宝" class="tb"><i></i></div><?php }?>
                                       <?php if($row['laiyuan_type']==2){?><div title="天猫" class="tmall"><i></i></div><?php }?>
			    <?=$row['title']?></div>
	                                <div class="money_bg">
	                                    <div class="f_money2">内部券 <span><?=$row['price_jian']?></span> 元  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;过期时间：<?=$row['endtime']?></div>
						<?php if($row['quan_total']>0){?>
						 <div class="f_money3">返利比例：<span><?=number_format($row['fanli_bl'],0)?>%</span>   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;券后返：<span>
							<?php $a=number_format($row['discount_price'],0)-$row['price_jian'];
                               $b=$row['fanli_bl'];
                               $quanhoufan=number_format(($a*$b),0);
                               echo $quanhoufan;
                               ?></span> 集分宝</div>
						<?php }else{?>
						<div class="f_money3">优惠券剩余：<span><?=$row['quan_surplus']?></span> 张  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;销量：<span><?=$row['sell']?></span> 件</div>
						<?php }?>
						
						<div class="price mt-15 pb-5">
						<span class="l f-16 ml-20">劵后价：</span>
						<span class="l mr-5 mt-5">¥</span>
						<span class="l real">
						<?php if($row['quan_total']>0){?>
						<?=number_format($row['discount_price'],1)-$row['price_jian']?>
						<?php }else{?><?=number_format($row['discount_price'],1)?>
						<?php }?>
						 </span>
						 <del>￥<?=number_format($row['price'])?></del>
					</div>
					<p class="buy"> 
					<?php if($row['is_starttime']){?>
         <a class="yugao click_url" dd-href="?mod=jump&act=s8&iid=<?=iid_encode($row['data_id'])?>&url=" data-itemid="<?=$row['data_id']?>" isconvert=1 href="<?=$row['url']?>"  title="<?=$row['starttime_tag']?>开始" target="_blank"><?=$row['starttime_tag']?>开始</a>
          <?php }else{?>
         <a class="left1" href="<?=$row['lq_url']?$row['lq_url']:'javascript:void(0)'?>"  title="先领券再下单" target="_blank">点我领券</a>
                   <a class="right2 click_url" dd-href="?mod=jump&act=s8&iid=<?=iid_encode($row['data_id'])?>&url=" data-itemid="<?=$row['data_id']?>" isconvert=1 href="<?=$row['jump']?>" title="立即去淘宝购买" target="_blank">去<?php if($row['laiyuan_type']==1){?>淘宝<?php }?>
<?php if($row['laiyuan_type']==2){?>天猫<?php }?>下单</a>
            <?php }?>		
					</p>
        
	                                 
										
	                                </div>	</div>
	                            </div>	  
 <div class="xihuan">	
	<a class="y-like my-like" title="<?=$row['is_shoucang']==1?'已收藏':'加入收藏'?>" data_id="<?=$row['id']?$row['id']:$row['data_id']?>">
	<span class="like-ico <?=$row['is_shoucang']==1?'l-active':''?>"></span></a> </div>
                        	 </div></li> 
<?php }?>
<?php }elseif(defined('VIEW_PAGE')){?>
       	<div class="empty_data">
          <div class="empty_ico">&nbsp;</div>
          <div class="empty_word">抱歉，没有找到相关商品。</div>
		  <div style="clear:both"></div>
        </div>
        <?php }?>
<?php if(defined('VIEW_PAGE')||$_GET['page']<=1){?>
</ul>
<div style="clear:both"></div>
</div>
<?php include(TPLPATH.'/inc/tdj.tpl.php');?>
<?php }?>



